<!--
 * @Author: zy
 * @Date: 2022-06-12 15:19:04
 * @LastEditTime: 2022-07-26 15:46:09
 * @Description: 用户列表
-->
<template>
  <view class="mt-3 mb-2">
    <view class="cu-bar mb-2">
      <view class="action">
        <view class="cuIcon-titles text-blue"></view>
        用户列表
      </view>
      <!-- <text class="text-gray" @click="goPage('/pages/index/healthNews/index')">更多></text> -->
    </view>

    <view class="cu-list menu-avatar">
      <view class="cu-item" @click="goDesc(item)" v-for="(item,index) in list" :key='item.id'>
        <view class="cu-avatar round lg" :style="'background-image:url('+item.headImgUrl+');'"></view>
        <view class="content">
          <view class="text-grey">
            <text>{{item.nickname||''}}</text>
            <text class="ml-2">{{item.phone|formatPhone}}</text>
          </view>
          <view class="text-gray text-sm flex">
            <view class="text-cut">
              <text class="cuIcon-infofill text-red  margin-right-xs"></text>
              更新时间 {{item.updateTime}}
            </view>
          </view>
        </view>
        <view class="action">
          <view class="text-grey text-xs">{{item.createTime|timeFormat('mm-dd')}}</view>
          <view class="cu-tag round bg-grey sm">{{index}}</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    props: {
      list: {
        type: Array,
        default () {
          return []
        }
      },
    },
    data() {
      return {}
    },
    onLoad() {},
    watch: {},
    methods: {
      goDesc(item) {
        this.goPage(`/pages/index/user?id=${item.id}`);
      }
    }
  }

</script>

<style>
</style>

<style lang='scss' scoped>

</style>
